package pojo.qo;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@ApiModel("用户信息类")
public class UserInformation {
    private Long userId;                                 //用户ID
    private String userName;                           //用户名
    private String userSex;                            //性别
    private String phoneNumber;                        //手机号

    private String password;                           //密码
    private String email;                              //邮箱
//    @ApiModelProperty(value = "积分",hidden = true)
    private int integral;                              //积分
//    @ApiModelProperty(value = "余额",hidden = true)
    private double balance;                             //余额
//    @ApiModelProperty(value = "地址id",hidden = true)
    private String userImg;                             //头像路径

    @DateTimeFormat(pattern ="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
//    @ApiModelProperty(value = "创建时间",hidden = true)
    private Date createTime;                            //创建时间

    public UserInformation() {
    }

    public UserInformation(Long userId, String userName, String userSex, String phoneNumber, String password, String email, int integral, double balance, Date createTime, String userImg) {
        this.userId = userId;
        this.userName = userName;
        this.userSex = userSex;
        this.phoneNumber = phoneNumber;
        this.password = password;
        this.email = email;
        this.integral = integral;
        this.balance = balance;
        this.createTime = createTime;
        this.userImg = userImg;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserSex() {
        return userSex;
    }

    public void setUserSex(String userSex) {
        this.userSex = userSex;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public int getIntegral() {
        return integral;
    }

    public void setIntegral(int integral) {
        this.integral = integral;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getUserImg() {
        return userImg;
    }

    public void setUserImg(String userImg) {
        this.userImg = userImg;
    }

    @Override
    public String toString() {
        return "UserInformation{" +
                "userId=" + userId +
                ", userName='" + userName + '\'' +
                ", userSex='" + userSex + '\'' +
                ", phoneNumber='" + phoneNumber + '\'' +
                ", password='" + password + '\'' +
                ", email='" + email + '\'' +
                ", integral=" + integral +
                ", balance=" + balance +
                ", createTime=" + createTime +
                ", userImg='" + userImg + '\'' +
                '}';
    }
}
